package com.hspedu.homework.homework05;

/**
 * 5.设计父类：员工类，
 * 子类：工人类Worker 农民类Peasant 教师类Teacher 科学家类Scientist 服务生类Waiter
 * 1.其中工人 农民 服务生只有基本工资
 * 2.教师除基本工资外，还有课酬（元/天）
 * 3.科学家除基本工资外，还有年终奖
 * 4.编写一个测试类，将各种类型的员工的全年工资打印出来
 */
public class homework05 {
    public static void main(String[] args) {
        Employee worker = new Worker(6000);
        Employee peasant = new Peasant(6000);
        Employee waiter = new Waiter(6000);
        ((Worker)worker).annualSalary();
        ((Peasant)peasant).annualSalary();
        ((Waiter)waiter).annualSalary();

        Employee teacher = new Teacher(8000,200);
        ((Teacher)teacher).annualSalary();
        Employee scientist = new Scientist(12000, 36000);
        ((Scientist)scientist).annualSalary();
    }
}
